<?php 
//*********************************** 
//Universal Media Publishing Platform
//Sorting settings
//*********************************** 

if(isset($_GET["sort"])){
    switch ($_GET["sort"]) {
        case "title":
            $sorting = "title";
            break;
        case "date":
            $sorting = "date";
            break;
        case "views":
            $sorting = "views";
            break;
		case "author":
            $sorting = "author";
			break;
		case "artist":
            $sorting = "artist";
			break;
		case "album":
            $sorting = "album";
			break;
		case "genre":
            $sorting = "genre";
            break;
		case "year":
            $sorting = "year";
            break;
        default:
            $sorting = "date";
			break;
    }
} else $sorting = "date";

if(isset($_GET["st"])){
    switch ($_GET["st"]) {
        case "up":
            $st = "ASC";
            break;
        case "down":
            $st = "DESC";
            break;
        default:
            $st = "DESC";
			break;
    }
} else $st = "DESC";
?>
